<?php

use Illuminate\Database\Seeder;

class Admin_Users_Info_Seeder extends Seeder
{
    /**
     * @author mais <[<380354618@qq.com>]>
     * 后台用户登录信息表 admin_users_info 
     * 随机填充数据 100条
     * @return void
     */
    public function run()
    {
        for ($i=1; $i<=100; $i++) {
            DB::table('admin_users_info')->insert([
                'uid' => mt_rand(1,20),
                'lastlogin_ip' => '192'.'.'.'168'.'.'.$i.'.'.$i,
                'lastlogin_time' => 1500000000+mt_rand(0,6000000),
                'lastout_time' => 1500000000+mt_rand(0,6000000),
                'state' => $i%4,
                'created_at' => date('y-m-d h:i:s',time()),
                'updated_at' => date('y-m-d h:i:s',time()),
            ]);
        }
    }
}
